package lib.bone.system.module.notify.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lib.bone.common.converter.JpaListLongConverter;
import lib.bone.common.converter.JpaListStringConverter;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * @author kindear
 * 系统通知消息
 */
@Data
@Entity
@Table(name = "sys_notify")
@ApiModel(value = "系统通知",description = "系统通知管理")
@EntityListeners(AuditingEntityListener.class)
public class SysNotify {
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "通知ID",name = "id")
    Long id;

    @ApiModelProperty("通知内容")
    @Column(name = "content")
    String content;

    @ApiModelProperty("操作人员")
    @Column(name = "operator")
    Long operator;

    @ApiModelProperty(value = "通知状态",notes = "1 为正常 0为关闭")
    @Column(name = "notify_status")
    Integer notifyStatus;

    @CreatedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录创建时间",name = "createdTime")
    @Column(name = "created_time")
    private Date createdTime;
    @LastModifiedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录更新时间",name = "updatedTime")
    @Column(name = "updated_time")
    private Date updatedTime;

}
